home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import com.sun.java.swing.event.DocumentEvent;
- import com.sun.java.swing.event.DocumentListener;
- import com.sun.java.swing.text.Document;
- import java.awt.Rectangle;
- import java.beans.PropertyChangeEvent;
- import java.beans.PropertyChangeListener;
-
- class BasicTextUI$UpdateHandler implements PropertyChangeListener, DocumentListener {
- // $FF: synthetic field
- BasicTextUI this$0;
-
- public final void propertyChange(PropertyChangeEvent evt) {
- Object oldValue = evt.getOldValue();
- Object newValue = evt.getNewValue();
- if (oldValue instanceof Document || newValue instanceof Document) {
- if (oldValue != null) {
- ((Document)oldValue).removeDocumentListener(this);
- }
-
- if (newValue != null) {
- ((Document)newValue).addDocumentListener(this);
- }
-
- this.this$0.modelChanged();
- }
-
- this.this$0.propertyChange(evt);
- }
-
- public final void insertUpdate(DocumentEvent e) {
- Rectangle alloc = this.this$0.painted ? new Rectangle(this.this$0.editor.getSize()) : null;
- this.this$0.rootView.insertUpdate(e, alloc, this.this$0.rootView.getViewFactory());
- }
-
- public final void removeUpdate(DocumentEvent e) {
- Rectangle alloc = this.this$0.painted ? new Rectangle(this.this$0.editor.getSize()) : null;
- this.this$0.rootView.removeUpdate(e, alloc, this.this$0.rootView.getViewFactory());
- }
-
- public final void changedUpdate(DocumentEvent e) {
- Rectangle alloc = this.this$0.painted ? new Rectangle(this.this$0.editor.getSize()) : null;
- this.this$0.rootView.changedUpdate(e, alloc, this.this$0.rootView.getViewFactory());
- }
-
- // $FF: synthetic method
- BasicTextUI$UpdateHandler(BasicTextUI this$0) {
- this.this$0 = this$0;
- }
- }
-